Force RTC driver to fail to load in domU by preventing it
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 17 Oct 2005 13:02:36 +0000 (14:02 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 17 Oct 2005 13:02:36 +0000 (14:02 +0100)
from binding to IRQ8.
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c

index cb0e1f97839d6a40c31d6565ea64c40dcec9e8a7..80e017684bd809692f46e5442b21dbb59103f2bd 100644 (file)
@@ -42,6 +42,7 @@
 #include <asm-xen/xen-public/physdev.h>
 #include <asm/hypervisor.h>
 #include <asm-xen/evtchn.h>
+#include <linux/mc146818rtc.h> /* RTC_IRQ */
 
 /*
  * This lock protects updates to the following mapping and reference-count
@@ -744,6 +745,13 @@ void __init init_IRQ(void)
        {
                irq_bindcount[pirq_to_irq(i)] = 1;
 
+#ifdef RTC_IRQ
+               /* If not domain 0, force our RTC driver to fail its probe. */
+               if ((i == RTC_IRQ) &&
+                   !(xen_start_info->flags & SIF_INITDOMAIN))
+                       continue;
+#endif
+
                irq_desc[pirq_to_irq(i)].status  = IRQ_DISABLED;
                irq_desc[pirq_to_irq(i)].action  = 0;
                irq_desc[pirq_to_irq(i)].depth   = 1;